#ifndef GAME_H
#define GAME_H

#include "EngineApi.h"
#include "Window.h"
#include "Console.h"
#include "Renderer.h"
#include "Importer.h"
#include "Scene.h"
#include "Timer.h"
#include "Input.h"
#include "DirectInput.h"

class ENGINE_API Game
{
public:
   Game(HINSTANCE hInstance);

   bool start();
   void loop();
   bool shutDown();

protected:
   virtual bool onStart()=0;
   virtual bool onLoop()=0;
   virtual bool onDraw()=0;
   virtual bool onShutDown()=0;
   
   Renderer* getRenderer() { return m_pRenderer; }
   Importer* getImporter() { return m_pImporter; }
   Input* getInput() { return m_pInput; }

   void addScene(Scene* scene);

private:
   Window* m_pWindow;
   Console m_console;
   
   Renderer* m_pRenderer;

   HINSTANCE m_pHInstance;

   Importer* m_pImporter;

   std::map<std::string, Scene*> m_sceneMap;

   Timer m_timer;

   Input* m_pInput;

   void updateScenes();
   void drawScenes();
};


#endif//GAME_H